package com.njwb.day04;

public class Test车 {
    public static void main(String[] args) {
        //根据车的设计图纸造车：创建对象
        车 car=new 车();
        System.out.println(car);
        String pp=car.品牌;
        //属性方法的调用
        System.out.println("品牌："+pp);
        System.out.println("颜色："+car.颜色);
        System.out.println("排量："+car.排量);
        car.移动();
        车 car2=new 车();
        System.out.println(car2);
        车 car3=new 车();
        System.out.println(car3);
        System.out.println("=================");
        //赋值
        car.品牌="宝马";
        car.颜色="蓝色";
        car.排量=3.0;
        System.out.println("品牌："+car.品牌);
        System.out.println("颜色："+car.颜色);
        System.out.println("排量："+car.排量);
        System.out.println("品牌："+car2.品牌);
        System.out.println("颜色："+car2.颜色);
        System.out.println("排量："+car2.排量);
        System.out.println("品牌："+car3.品牌);
        System.out.println("颜色："+car3.颜色);
        System.out.println("排量："+car3.排量);


    }
}
